﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSemanticAnalyser.SemanticTree
{
    using daSyntaxAnalyser.SyntaxTree;

    /// <summary>
    /// Директива external
    /// </summary>
    public class ExternalMethodDirectiveSemanticElement : MethodDirectiveSemanticElement
    {
        private ExpressionElement from;
        private ExternalOptionSemanticElement option;

        /// <summary>
        /// Источник
        /// </summary>
        public ExpressionElement From { get { return from; } set { from = value; } }

        /// <summary>
        /// Дополнительная опция (name, index)
        /// </summary>
        public ExternalOptionSemanticElement Option { get { return option; } set { option = value; } }

        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="Parent">родитель элемента семантического дерева</param>
        /// <param name="From">источник</param>
        /// <param name="Option">дополнительная опция (name, index)</param>
        /// <param name="SyntaxElement">соответствующий элемент синтаксического дерева</param>
        public ExternalMethodDirectiveSemanticElement(IChildSemanticElement Parent, ExpressionElement From, ExternalOptionSemanticElement Option, ISyntaxTreeElement SyntaxElement)
            : base(Parent, MethodDirectives.External, SyntaxElement)
        {
            from = From;
            option = Option;
        }
    }
}
